package com.vr.xuecheng.learning.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vr.xuecheng.feign.dto.CoursePublishDTO;
import com.vr.xuecheng.learning.dto.CourseTablesDTO;
import com.vr.xuecheng.learning.entity.ChooseCourse;
import com.vr.xuecheng.learning.vo.ChooseCourseVO;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hzh
 */
public interface IChooseCourseService extends IService<ChooseCourse> {

    /**
     * @param courseId 课程id
     * @return {@code ChooseCourseVO } 选择课程vo
     * 选择课程
     */
    ChooseCourseVO chooseCourse(Long courseId);

    /**
     * @param userId 用户id
     * @param coursePublishDTO 课程信息
     * @return {@code ChooseCourse } 添加后的课程信息
     * 添加免费课程
     */
    ChooseCourse addFreeCourse(String userId, CoursePublishDTO coursePublishDTO);

    /**
     * @param userId 用户id
     * @param coursePublishDTO 课程信息
     * @return {@code ChooseCourse } 添加后的课程信息
     * 添加收费课程
     */
    ChooseCourse addChargeCourse(String userId, CoursePublishDTO coursePublishDTO);

    /**
     * @param userId   用户id
     * @param courseId 课程id
     * @return {@code String } 学习资格id
     */
    CourseTablesDTO getLearningStatus(String userId, Long courseId);

    /**
     * @param courseId 课程id
     * @return boolean 是否选课成功
     * 更新选课状态为成功
     */
    boolean updateChooseCourseSuccess(Long courseId);
}
